import Vue from 'vue'
import App from './App'
import uView from "./plugin/uview-ui";
import store from './store'
import MinCache from './common/util/MinCache.js'

import configService from './common/service/config.service.js'

import router from './common/router'
import {
	RouterMount
} from './plugin/uni-simple-router/index.js'

// import * as filters from '@/filter/index.js'

// Object.keys(filters).forEach(name => {
// 	Vue.filter(name, filters[name])
// })



// 注册缓存器
Vue.use(MinCache, {
	timeout: 6
})

Vue.use(uView);

// store
Vue.prototype.$store = store;
// config
Vue.prototype.$config = configService;


// request请求
import {
	http
} from '@/common/service/service.js'
Vue.prototype.$http = http

import cuCustom from './plugin/colorui/components/cu-custom.vue'
Vue.component('cu-custom', cuCustom);

// import cuCustomClick from './plugin/colorui/components/cu-custom-click.vue'
// Vue.component('cu-custom-click', cuCustomClick)

import home from './pages/home/index.vue'
Vue.component('home', home);

import workbench from './pages/workbench/index.vue'
Vue.component('workbench', workbench);

import personage from './pages/personage/index.vue'
Vue.component('personage', personage);



Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	store,
	MinCache,
	...App
})
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app, '#app');
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
